package com.orangelife.webservice.tigger;

import java.util.Date;

import javax.annotation.Resource;

import org.apache.log4j.Logger;

import com.orangelife.service.bill.IComputeBillService;
import com.orangelife.service.propFeeReductionInfo.IPropFeeReductionInfoService;

public class RecoderTigger {

	private static Logger logger = Logger.getLogger(RecoderTigger.class);
	@Resource(name = "propFeeReductionInfoService")
	private IPropFeeReductionInfoService propFeeReductionInfoService;
	@Resource(name = "computeBillService")
	private IComputeBillService computeBillService;
	/**
	 * 自动中扣减数据
	 */
	public void autoReduction() {

		System.out.println("——————————————————————" + new Date() + "自动扣减定时器"
				+ "————————————————————————————————————");
		try {
			propFeeReductionInfoService.autoReduction();
		} catch (Exception e) {
			e.printStackTrace();
			logger.error(e.getMessage());
		}

	}	/**
	 * 自动生成预缴费用
	 */
	public void autoCrePreFeeDetail() {

		System.out.println("——————————————————————" + new Date() + "自动生成预缴费用"
				+ "————————————————————————————————————");
		try {
			computeBillService.autoCrePreFeeDetail(null);
		} catch (Exception e) {
			e.printStackTrace();
			logger.error(e.getMessage());
		}

	}
}
